package cn.dakaqi.entities;

import cn.dakaqi.utils.Clock;
import cn.dakaqi.utils.DKQConstant;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;

import javax.persistence.Cacheable;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * Created by chunyang on 2016/4/18.
 * 自定义活动标签
 */

@Entity
@Table(name = "U_ACTIVITY_TAG")
public class ActivityTag extends IdEntity
{

    private static final long serialVersionUID = 2278184936853984757L;
    private String memberCode;
    private String name;
    private int delStatus;
    private Date createTime;

    public ActivityTag(String memberCode, String name)
    {
        this.memberCode = memberCode;
        this.name = name;
        this.delStatus = DKQConstant.DEL_NO;
        this.createTime = Clock.DEFAULT.getCurrentDate();
    }

    public ActivityTag()
    {
    }

    public ActivityTag(Long id)
    {
        this.id = id;
    }

    @JsonIgnore
    public String getMemberCode()
    {
        return memberCode;
    }

    public void setMemberCode(String memberCode)
    {
        this.memberCode = memberCode;
    }

    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }
    @JsonIgnore
    public int getDelStatus()
    {
        return delStatus;
    }

    public void setDelStatus(int delStatus)
    {
        this.delStatus = delStatus;
    }

    @JsonIgnore
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+08:00")
    public Date getCreateTime()
    {
        return createTime;
    }

    public void setCreateTime(Date createTime)
    {
        this.createTime = createTime;
    }
}
